﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace SiGeSIB.GUI.Common.DedaGrid.Utils
{
	public class DedaGridColumn
	{
		public DedaGridColumn(string columnName, Type type)
		{
			this.ColumnName = columnName;
			this.Type = type;
			this.Visible = true;
		}

		#region DefaultProperties
		public string ColumnName { get; private set; }
		public Type Type { get; private set; }
		#endregion

		#region ExtendedProperties
		public bool Visible { get; set; }
		#endregion

		#region Properties
		public DataColumn DataColumn
		{
			get
			{
				DataColumn col = new DataColumn(ColumnName, Type);
				col.ExtendedProperties.Add("Visible", Visible);

				return col;
			}
		}
		#endregion
	}
}
